package it.scambiocorse.rowmapper;

import it.scambiocorse.model.CronBean;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;
import org.springframework.jdbc.core.RowMapper;

public class CronRowMapper implements RowMapper {

	public Object mapRow(ResultSet rs, int arg1) throws SQLException {
		CronBean c = new CronBean();
		c.setIdArea(rs.getInt("id_area"));
		c.setIdUser(rs.getInt("id_user"));
		c.setDare(rs.getInt("dare"));
		c.setAvere(rs.getInt("avere"));
		c.setFeedPosi(rs.getInt("feed_posi"));
		c.setFeedNega(rs.getInt("feed_nega"));
		
		return c;
	}

}
